<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户列表</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
    <link rel="stylesheet" href="../../css/vip.css" type="text/css">
    <SCRIPT language=JavaScript src="../../js/jquery.js"></SCRIPT>
  <SCRIPT language=JavaScript src="../../js/FoshanRen.js"></SCRIPT>
  <link rel="stylesheet" type="text/css" href="../../js/extjs/resources/css/ext-all.css"/>
<script type="text/javascript" charset="utf-8" src="../../js/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/extjs/ext-all.js"></script>
 <script language="JavaScript">
 function topage(page){
	var s="<s:url action='user_list.action' namespace='/admin/user'/>?"
	+"&page="+page;
	javascript:window.location.href=s;
	}
 
	function deleteItem(id){
	 if(confirm("你确定要删除")){
	    $.get("user_delete.action?user.id="+id,
	    function(data){
	    $("#"+id).remove();
	    alert(data);
	    });
      }
    }
  </script>
</head>
<body>
  <s:form action="user_query" namespace="/admin/user" enctype="multipart/form-data"  method="post">
  <s:hidden name="typeid"/>
 <table width="98%" border="0" cellspacing="1" cellpadding="3" align="center">
    <tr bgcolor="6f8ac4"> 
       <td colspan="2" ><font color="#FFFFFF">查询用户（请选择其中的一个或多个条件进行查询）：</font></td>
    </tr>
    <tr > 
      <td> <div align="right">用户名  ：</div></td>
      <td><s:textfield name="userQuery.userName" size="30" maxlength="40"/></td>
      <td> <div align="right">真实姓名：</div></td>
      <td><s:textfield name="userQuery.realName" size="50" maxlength="40"/></td>
      <td> <div align="right">用户类型 ：</div></td>
      <td>
      <s:select name="userQuery.userType" list="#{'null':'选择类型','ADMINISTRATOR':'管理员','SENIORUSER':'高级用户','COMMENUSER':'一般用户'}"  /></td>
    </tr>
    <tr > 
      <td colspan="2"> <div align="center"> 
          <input type="submit" name="edit" value="查询" class="frm_btn">
          &nbsp;&nbsp;<input type="button" name="Button" value="返回" class="frm_btn" onclick="javascript:history.back()">
        </div></td>
    </tr>
  </table>
</s:form>

  <table width="98%" border="0" cellspacing="1" cellpadding="2" align="center">
    <tr ><td colspan="10"  bgcolor="6f8ac4" align="right">
    	<%@ include file="/WEB-INF/page/shared/fenye.jsp" %>
   </td></tr>
    <tr>
      <td width="20%" bgcolor="6f8ac4"> <div align="center"><font color="#FFFFFF">用户名</font></div></td>
      <td width="20%" bgcolor="6f8ac4"> <div align="center"><font color="#FFFFFF">真实姓名</font></div></td>
	  <td width="20%" nowrap bgcolor="6f8ac4"> <div align="center"><font color="#FFFFFF">用户类型</font></div></td>
      <td width="10%" nowrap bgcolor="6f8ac4"> <div align="center"><font color="#FFFFFF">修改</font></div></td>
      <td width="20%" nowrap bgcolor="6f8ac4"> <div align="center"><font color="#FFFFFF">删除</font></div></td>
    </tr>
    <s:iterator value="#pageView.records">
    <tr id="<s:property value='id'/>">
      <td bgcolor="f5f5f5"> <div align="center"><s:property value="userName"/></div></td>
	  <td bgcolor="f5f5f5"> <div align="center"><s:property value="realName"/></div></td>
	  <td bgcolor="f5f5f5"> <div align="center"><s:property value="userType"/></div></td>
	  <td bgcolor="f5f5f5"> <div align="center"><a href='<s:url action="user_edit" namespace="/admin/user"><s:param name="user.id" value="%{id}"></s:param></s:url>'>
	  <img src="../../images/edit.gif" width="15" height="16" border="0"></a></div></td>
	  <td bgcolor="f5f5f5"> <div align="center"><input type="button" class="frm_btn" value="删除" onClick="deleteItem(<s:property value='id'/>)"/></div></td> 
	</tr>
    </s:iterator>
     <tr> 
      <td bgcolor="f5f5f5" colspan="8" align="center"><table width="100%" border="0" cellspacing="1" cellpadding="3">
       
      </table></td>
    </tr>
  </table>
</body>
</html>